!integral
integer function soal1a()
	implicit none
	external psoal1a
	call psoal1a()
	
	soal1a = 1
end

integer function soal2a()
	implicit none
	external psoal2a
	call psoal2a()
	
	soal2a = 1
end

integer function soal3a()

end

integer function soal4a()

end

integer function soal5a()
	implicit none
	external psoal5a
	call psoal5a()
	soal5a = 1
end

integer function soal6a()

end

integer function soal7a()
	implicit none
	external psoal7a
	call psoal7a()
	soal7a = 1
end

integer function soal1b()
	implicit none
	external psoal1b
	call psoal1b()
	soal1b = 1
end

integer function soal4b()
	implicit none
	external psoal4b
	call psoal4b()
	soal4b = 1
end

integer function soal5b()
	implicit none
	external psoal5b
	call psoal5b()
	soal5b = 1
end

!-------------------------------------------------------------------------------
!		INTEGRAL
!-------------------------------------------------------------------------------

subroutine psoal1a()
	implicit none
	external hitungpsoal1a
	integer i,k, n
	double precision hasil
	common /area1/ n, hasil, k
	character*20 m(9)
	data m/'trpsium','ttktgh','s1/3','s1/8','rmb','gl1','gl2','gl3','gl4'/
	
	i	= winio@('%ca[Soal 1 Integral]%bg[grey]&')
	i	= winio@('Metode =&')
	i  	= winio@('%`ls%ta&',m,9,k)
	i	= winio@('%2nl%cn%itJumlah pias%`it  = &')
	i	= winio@('%3rd&',n)
	i	= winio@('%fl&', 0.0D0, 200.0D0)
	i	= winio@('%2nl%cn%40^bt[Hitung]&', hitungpsoal1a)
	i	= winio@('%2nl%cn%ob[named_c][Hasil]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,hasil)
	i	= winio@('%cb%4nl%cn%bt[BACK]')
end

subroutine psoal2a()
	implicit none
	external hitungpsoal2a
	integer i, metode, n
	include <windows.ins>
	double precision hasil
	common /area2/ n, hasil, metode
	character*40 m(3)
	data m/'trapesium kdua arah', 'simpson 1/3 kdua arah', 'gl 2 titik kdua arah'/
	
	i	= winio@('%ca[Soal 1 Integral]%bg[grey]&')
	i	= winio@('Metode =&')
	i  	= winio@('%`ls%ta&',m,3,metode)
	i	= winio@('%2nl%cn%itJumlah pias%`it  = &')
	i	= winio@('%3rd&',n)
	i	= winio@('%fl&', 0.0D0, 200.0D0)
	i	= winio@('%2nl%cn%40^bt[Hitung]&', hitungpsoal2a)
	i	= winio@('%2nl%cn%ob[named_c][Hasil]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,hasil)
	i	= winio@('%cb%4nl%cn%bt[BACK]')
end

subroutine psoal3a()
	implicit none
	external hitungpsoal3a
	double precision hasil
	integer i, metode,interval,t
	character*40 m(4),z(4),tt(3)	
	data m/'trapesium', '3/8 simpson', 'romberg', 'gl orde 4'/
	data z/'(0,10)','(100,110)','(1000,1010)','(0,~)'/
	data tt/'10', '100', '1000'/'
	common /area3a/ metode, interval, t, hasil
	
	i	= winio@('%ca[Soal 1 Integral Rekayasa]%bg[grey]&')
	i	= winio@('%cnMetode =&')
	i  	= winio@('%`ls%ta&',m,4,metode)
	i	= winio@('%3nl%cnPjg Glmbang =&')
	i  	= winio@('%`ls%ta&',m,4,interval)
	i	= winio@('%2nl%cnT =&')
	i  	= winio@('%`ls%ta&',m,3,t)
	i	= winio@('%fl&', 0.0D0, 200.0D0)
	i	= winio@('%2nl%cn%40^bt[Hitung]&', hitungpsoal3a)
	i	= winio@('%2nl%cn%ob[named_c][Hasil]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,hasil)
	i	= winio@('%cb%4nl%cn%bt[BACK]')
end

subroutine psoal5a()
	implicit none
	
	integer i, n, metode, a, b
	external hitungpsoal5a
	double precision hasil
	integer t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11
	integer*4 tsiang(10), tmalam(10)
	common /area5a/ tsiang, tmalam, hasil, metode, a, b
	character*40 m(3)
	data m/'trapesium ', 'simpson 1/3 ', 'simpson 3/8'/
	
	t1 = 1
	t2 = 10
	t3 = 19
	t4 = 28
	t5 = 37
	t6 = 46
	t7 = 55
	t8 = 64
	t9 = 73
	t10 = 82
	t11 = 91
	
	tsiang(1) = 74
	tsiang(2) = 85
	tsiang(3) = 106
	tsiang(4) = 115
	tsiang(5) = 94
	tsiang(6) = 88
	tsiang(7) = 91
	tsiang(8) = 110
	tsiang(9) = 123
	tsiang(10) = 142
	
	tmalam(1) = 153
	tmalam(2) = 121
	tmalam(3) = 80
	tmalam(4) = 77
	tmalam(5) = 54
	tmalam(6) = 42
	tmalam(7) = 38
	tmalam(8) = 34
	tmalam(9) = 45
	tmalam(10) = 66
	
	i	= winio@('%ca[Soal 3 Integral Rekayasa]%bg[grey]&')
	i	= winio@('%cnMetode =&')
	i  	= winio@('%`ls%ta&',m,3,metode)
	i	= winio@('%11tl&',t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11)
	i	= winio@('%ta%ita = %ta%4rd&', a)
	i	= winio@('%ta%itb = %ta%4rd&', b)
	i	= winio@('%4nl%ta%itT   &')
	i	= winio@('%ta%it1   &')
	i	= winio@('%ta%it2   &')
	i	= winio@('%ta%it3   &')
	i	= winio@('%ta%it4   &')
	i	= winio@('%ta%it5   &')
	i	= winio@('%ta%it6   &')
	i	= winio@('%ta%it7   &')
	i	= winio@('%ta%it8   &')
	i	= winio@('%ta%it9   &')
	i	= winio@('%ta%it10  &')
	i	= winio@('%nl%ta%itSiang   &')
	i	= winio@('%ta%4rd&',tsiang(1))
	i	= winio@('%ta%4rd&',tsiang(2))
	i	= winio@('%ta%4rd&',tsiang(3))
	i	= winio@('%ta%4rd&',tsiang(4))
	i	= winio@('%ta%4rd&',tsiang(5))
	i	= winio@('%ta%4rd&',tsiang(6))
	i	= winio@('%ta%4rd&',tsiang(7))
	i	= winio@('%ta%4rd&',tsiang(8))
	i	= winio@('%ta%4rd&',tsiang(9))
	i	= winio@('%ta%4rd&',tsiang(10))
	i	= winio@('%nl%ta%itMlem   &')
	i	= winio@('%ta%4rd&',tmalam(1))
	i	= winio@('%ta%4rd&',tmalam(2))
	i	= winio@('%ta%4rd&',tmalam(3))
	i	= winio@('%ta%4rd&',tmalam(4))
	i	= winio@('%ta%4rd&',tmalam(5))
	i	= winio@('%ta%4rd&',tmalam(6))
	i	= winio@('%ta%4rd&',tmalam(7))
	i	= winio@('%ta%4rd&',tmalam(8))
	i	= winio@('%ta%4rd&',tmalam(9))
	i	= winio@('%ta%4rd&',tmalam(10))
	i	= winio@('%fl&', 0.0D0, 200.0D0)
	i	= winio@('%2nl%cn%40^bt[Hitung]&',hitungpsoal5a)
	i	= winio@('%2nl%cn%ob[named_c][Hasil]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,hasil)
	i	= winio@('%cb%4nl%cn%bt[BACK]')
	
end

subroutine psoal7a()
	implicit none
	external hitungpsoal7a
	integer i, metode, n
	character*40 m(5)
	double precision hasil
	data m/'trapesium', 'simpson 1/3', 'romberg', 'gauss 3', 'gauss 4'/
	common /area2/ n, hasil, metode
	
	i	= winio@('%ca[Soal 5 Integral Rekayasa]%bg[grey]&')
	i	= winio@('Metode =&')
	i  	= winio@('%`ls%ta&',m,5,metode)
	i	= winio@('%2nl%cn%itJumlah pias%`it  = &')
	i	= winio@('%4rd&',n)
	i	= winio@('%fl&', 0.0D0, 200.0D0)
	i	= winio@('%2nl%cn%40^bt[Hitung]&', hitungpsoal7a)
	i	= winio@('%2nl%cn%ob[named_c][Hasil]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,hasil)
	i	= winio@('%cb%4nl%cn%bt[BACK]')
end
	
	
!-------------------------------------------------------------------------------
!-------------------------------------------------------------------------------

integer function hitungpsoal1a()
	implicit none
	external soal1
	common /area1/ n, hasil, k
	double precision a, b, hasil
	integer n, k
	character*50 errmsge

	
	a = 0.0D0
	b = 100.0D0
	
	if(n.eq.0) then
		errmsge = "Nilai n kosong"
		call error(errmsge)
	else
		select case (k)
			case (1)
				call aturan_trapesium(a,b,n,hasil,soal1)
			case (2)
				call aturan_titiktengah(a,b,n,hasil,soal1)
			case (3)
				if (mod(n,2).eq.0) then
					call simpson_1_per_3(a,b,n,hasil,soal1)
				else
					errmsge = "Nilai n tidak bernilai genap"
					call error(errmsge)
				end if
			case (4)
				if (mod(n,3).eq.0) then
					call simpson_3_per_8(a,b,n,hasil,soal1)
				else
					errmsge = "Nilai n tidak berkelipatan tiga"
					call error(errmsge)
				end if
			case (5)
				call romberg(a,b,n,hasil,soal1)
			case (6)
				call aturan_gl(a,b,hasil,3,soal1)
			case (7)
				call aturan_gl(a,b,hasil,4,soal1)
			case (8)
				call aturan_gl(a,b,hasil,5,soal1)
			case (9)
				call aturan_gl(a,b,hasil,6,soal1)
		end select
	end if
	hitungpsoal1a = 1
end

integer function hitungpsoal2a()	
	implicit none	
	integer metode, n, r
	double precision soal2_xtetap
	external soal2_xtetap
	external ATURAN_TRAPESIUM, simpson_1_per_3, ATURAN_GL
	double precision a, b, hasil, delta
	double precision x, x_tetap, sigma, temp
	! gauss legendre 2 titik
	double precision f1, f2
	common /xtetap/ x_tetap
	common /area2/ n, hasil, metode
	character*50 errmsge
	!a,b untuk arah x dan y
	a = 0
	b = 1
	
	if(n.eq.0) then
		errmsge = "Nilai n kosong"
		call error(errmsge)
	else 	
		!jarak antar titik dalam arah x dan y
		delta = (b-a)/n
		x = a
		r = 1
		select case (metode)
			case (1)
				x_tetap = x
				sigma = 0
				do r=1,n+1
					call ATURAN_TRAPESIUM(a,b,n,temp,soal2_xtetap)
					!print*,"Untuk x = ",x_tetap," temp = ",temp
					x_tetap = x_tetap + delta
					if((r.eq.1).or.(r.eq.(n+1))) then
						sigma = sigma + temp
					else
						sigma = sigma + 2*temp
					end if
				end do
				hasil = sigma*delta/2
			case (2)
				if (mod(n,2).eq.0) then
					!aturan simpson_1_per_3 untuk arah y, x tetap
					x_tetap = x
					sigma = 0
					do r=1,n+1
						call simpson_1_per_3(a,b,n,temp,soal2_xtetap)
						!print*,"Untuk x = ",x_tetap," temp = ",temp
						x_tetap = x_tetap + delta
						if((r.eq.1).or.(r.eq.(n+1))) then
							sigma = sigma + temp
						else if (mod(r-1,2).eq.1) then
							sigma = sigma + 4*temp
							!print*,"ganjil"
						else
							sigma = sigma + 2*temp
							!print*,"genap"
						end if
					end do
					hasil = sigma*delta/3
				else
					errmsge = "Nilai n tidak bernilai genap"
					call error(errmsge)
				end if
			case (3)
				! x tetap untuk nilai sqrt(3)/3 dan -sqrt(3)/3
				x_tetap = ((a + b) + (b - a) * sqrt(3.D0)/3) / 2
				call ATURAN_GL(a,b,temp,2,soal2_xtetap)
				f1 = temp
				!print*,"f1 = ",f1
				x_tetap = ((a + b) + (b - a) * (-sqrt(3.D0)/3)) / 2
				call ATURAN_GL(a,b,temp,2,soal2_xtetap)
				f2 = temp
				!print*,"f2 = ",f2
				hasil = (b-a)*(f1+f2)/2
		end select
	end if
	hitungpsoal2a = 1
end

integer function hitungpsoal3a()
	implicit none
	external soal1
	common /area1/ n, hasil, k
	double precision a, b, hasil
	integer n, k
	character*50 errmsge
	common /area3a/ metode, interval, t, hasil
	
	a = 0.0D0
	b = 100.0D0
	
	!interval
	
	
	if(n.eq.0) then
		errmsge = "Nilai n kosong"
		call error(errmsge)
	else
		select case (k)
			case (1)
				call aturan_trapesium(a,b,n,hasil,soal1)
			case (2)
				if (mod(n,3).eq.0) then
					call simpson_3_per_8(a,b,n,hasil,soal1)
				else
					errmsge = "Nilai n tidak berkelipatan tiga"
					call error(errmsge)
				end if
			case (3)
				call romberg(a,b,n,hasil,soal1)
			case (4)
				call aturan_gl(a,b,hasil,4,soal1)
		end select
	end if
	hitungpsoal1a = 1
	
	
end

integer function hitungpsoal5a()
	implicit none
	integer metode,a,b,r
	integer*4 tsiang(10), tmalam(10)
	double precision I1,I2,sigma1,sigma2,hasil
	character*50 errmsge
	
	common /area5a/ tsiang, tmalam, hasil, metode, a, b
	
	select case (metode)
		case(1)
			!metode trapesium
			I1 = tsiang(a)+tsiang(b)
			I2 = tmalam(a)+tmalam(b)
			sigma1 = 0
			sigma2 = 0
			do r=a+1,b-1
				sigma1 = sigma1 + 2*tsiang(r)
				sigma2 = sigma2 + 2*tmalam(r)
			end do
			I1 = (I1+sigma1)*1/2
			I2 = (I2+sigma2)*1/2
			hasil = I1+I2
		case(2)
			!metode aturan 1/3 Simpson
			r = b-a+1
			if (mod(r,2).eq.0) then
				I1 = tsiang(a)+tsiang(b)
				I2 = tmalam(a)+tmalam(b)
				sigma1 = 0
				sigma2 = 0
				do r=a+1,b-1
					if (mod(r,2).eq.1) then
						sigma1 = sigma1 + 4*tsiang(r)
						sigma2 = sigma2 + 4*tmalam(r)
					else
						sigma1 = sigma1 + 2*tsiang(r)
						sigma2 = sigma2 + 2*tmalam(r)
					end if
				end do
				I1 = (I1+sigma1)*1/3
				I2 = (I2+sigma2)*1/3
				hasil = I1+I2
			else
				errmsge = "Nilai a, b tidak berjumlah genap"
				call error(errmsge)
			end if
		case(3)
			r = b-a+1
			if (mod(r,3).eq.0) then
				I1 = tsiang(a)+tsiang(b)
				I2 = tmalam(a)+tmalam(b)
				sigma1 = 0
				sigma2 = 0
				do r=a+1,b-1
					if (mod(r,3).eq.0) then
						sigma1 = sigma1 + 2*tsiang(r)
						sigma2 = sigma2 + 2*tmalam(r)
					else
						sigma1 = sigma1 + 3*tsiang(r)
						sigma2 = sigma2 + 3*tmalam(r)
					end if
				end do
				I1 = (I1+sigma1)*3/8
				I2 = (I2+sigma2)*3/8
				hasil = I1+I2
			else
				errmsge = "Data a, b tidak berkelipatan tiga"
				call error(errmsge)
			end if
	end select
	hitungpsoal5a = 1
end

integer function hitungpsoal7a()
	implicit none
	integer metode, n, temp
	double precision soal5_rekayasa, constant_T, hasil
	double precision a, b
	external soal5_rekayasa,ATURAN_TRAPESIUM,simpson_1_per_3
	external ROMBERG,ATURAN_GL
	character*50 errmsge
	common /area2/ n, hasil, metode
	
	a = 0
	constant_T = 1.0
	b = constant_T
	
	select case (metode)
		case(1)
			!metode trapesium
			!integral dari 0 - T
			call ATURAN_TRAPESIUM(a,b,n,hasil,soal5_rekayasa)
		case(2)
			if (mod(n,2).eq.0) then
				call simpson_1_per_3(a,b,n,hasil,soal5_rekayasa)
			else
				errmsge = "Nilai n tidak bernilai genap"
				call error(errmsge)
			end if
		case(3)
			temp = n
			call ROMBERG(a,b,temp,hasil,soal5_rekayasa)
		case(4)
			call ATURAN_GL(a,b,hasil,3,soal5_rekayasa)
		case(5)
			call ATURAN_GL(a,b,hasil,4,soal5_rekayasa)
	end select
	hitungpsoal7a = 1
end

!-------------------------------------------------------------------------------
!		DIFERENSIAL
!-------------------------------------------------------------------------------

subroutine psoal1b()
	implicit none
	external hitungpsoal1b
	integer i, k
	double precision hasil, b
	common /area1b/ b, hasil, k
	character*20 m(5)
	data m/'euler','heun','rk orde 3','rk orde 4','p-c adams-moulton'/
	
	i	= winio@('%ca[Soal 1 Diferensial]%bg[grey]&')
	i	= winio@('Metode =&')
	i  	= winio@('%`ls%ta&',m,5,k)
	i	= winio@('%2nl%cn%itx %`it  = &')
	i	= winio@('%3rf&',b)
	i	= winio@('%fl&', 0.0D0, 200.0D0)
	i	= winio@('%2nl%cn%40^bt[Hitung]&', hitungpsoal1b)
	i	= winio@('%2nl%cn%ob[named_c][Hasil]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,hasil)
	i	= winio@('%cb%4nl%cn%bt[BACK]')
end

subroutine psoal4b()
	implicit none
	external hitungpsoal4b
	integer i, metode
	character*20 m(5)
	data m/'euler','heun','rk orde 3','rk orde 4','p-c adams-moulton'/
	double precision x, y_hasil, z_hasil, h
	common /area4b/ x, metode, h, y_hasil, z_hasil
	
	i	= winio@('%ca[Soal 2 Diferensial Rekayasa]%bg[grey]&')
	i	= winio@('Metode =&')
	i  	= winio@('%`ls%ta&',m,5,metode)
	i	= winio@('%2nl%cn%itx(0<x<5)%`it  = &')
	i	= winio@('%5rf&',x)
	i	= winio@('%ith%`it = &')
	i	= winio@('%5rf&',h)
	i	= winio@('%fl&', 0.0D0, 200.0D0)
	i	= winio@('%2nl%cn%40^bt[Hitung]&', hitungpsoal4b)
	i	= winio@('%2nl%cn%ob[named_c][Nilai Y]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,y_hasil)
	i	= winio@('%cb%2nl%cn%ob[named_c][Nilai Z]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,z_hasil)
	i	= winio@('%cb%4nl%cn%bt[BACK]')
end

subroutine psoal5b()
	implicit none
	external hitungpsoal5b
	integer i, metode
	character*20 m(5)
	data m/'euler','heun','rk orde 3','rk orde 4','p-c adams-moulton'/
	double precision x, y_hasil, z_hasil
	common /area5b/ x, metode, y_hasil, z_hasil
	
	i	= winio@('%ca[Soal 3 Diferensial Rekayasa]%bg[grey]&')
	i	= winio@('Metode =&')
	i  	= winio@('%`ls%ta&',m,5,metode)
	i	= winio@('%2nl%cn%itx%`it  = &')
	i	= winio@('%5rf&',x)
	i	= winio@('%fl&', 0.0D0, 200.0D0)
	i	= winio@('%2nl%cn%40^bt[Hitung]&', hitungpsoal5b)
	i	= winio@('%2nl%cn%ob[named_c][Nilai Y]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,y_hasil)
	i	= winio@('%cb%2nl%cn%ob[named_c][Nilai Z]&')
	i	= winio@('%nl%dy%`rf&',0.0D0,z_hasil)
	i	= winio@('%cb%4nl%cn%bt[BACK]')
end

!-------------------------------------------------------------------------------
!-------------------------------------------------------------------------------

!Soal 1 Diferensial
integer function hitungpsoal1b()
	implicit none
	integer k
	double precision x0, y0, b, h, hasil
	external soal1_dif, ADAM_BASHFORTH_MOULTON
	external y_Euler, y_Heun, RUNGE_KUTTA_ORDE_3, RUNGE_KUTTA_ORDE_4
	common /area1b/ b, hasil, k
	character*50 errmsge
	
	x0 = 0		
	y0 = 0
	h  = 0.2
	
	if(b.eq.0) then
		errmsge = "Nilai b kosong"
		call error(errmsge)
	else
		select case(k)
			case(1)
				call y_Euler(x0, y0, b, h, hasil, soal1_dif)
			case(2)
				call y_Heun(x0, y0, b, h, hasil, soal1_dif)
			case(3)
				call RUNGE_KUTTA_ORDE_3(x0, y0, b, h,hasil, soal1_dif)
			case(4)
				call RUNGE_KUTTA_ORDE_4(x0, y0, b, h,hasil, soal1_dif)
			case(5)
				call ADAM_BASHFORTH_MOULTON(x0,y0, b, h, hasil, soal1_dif)
		end select
	end if
	hitungpsoal1b = 1
end

!Soal 2 Diferensial bidang fisika - gravitasi
integer function hitungpsoal4b()
	implicit none
	integer metode
	double precision x,h
	double precision soal2Rdz, soal2Rdy
	external soal2Rdz, soal2Rdy
	external runge_kutta_param3,runge_kutta_param4
	external adamsmuolton_param3,y_Heun_param3,y_Euler_param3
	double precision x0,y0,z0
	double precision y_hasil, z_hasil
	common /area4b/ x, metode, h, y_hasil, z_hasil
	character*50 errmsge
	x0 = 0
	y0 = 1
	z0 = 0
	if(x.eq.0.or.h.eq.0) then
		errmsge = "Input ada yang kosong"
		call error(errmsge)
	else
		select case (metode)
			case (1)
				call y_Euler_param3(x0,y0,z0,x,h,soal2Rdy,soal2Rdz,y_hasil,z_hasil)	
			case (2)
				call y_Heun_param3(x0,y0,z0,x,h,soal2Rdy,soal2Rdz,y_hasil,z_hasil)
			case (3)
				call runge_kutta_param3(x0,y0,z0,x,h,soal2Rdy,soal2Rdz,y_hasil,z_hasil)
			case (4)
				call runge_kutta_param4(x0,y0,z0,x,h,soal2Rdy,soal2Rdz,y_hasil,z_hasil)
			case (5)
				call adamsmuolton_param3(x0,y0,z0,x,h,soal2Rdy,soal2Rdz,y_hasil,z_hasil)
		end select
	end if
	
	hitungpsoal4b = 1
end

!Soal 3 Diferensial bidang listrik
integer function hitungpsoal5b()
	implicit none
	integer metode
	double precision x,h
	double precision soal3Rdz, soal3Rdy
	external soal3Rdz, soal3Rdy
	external runge_kutta_param3,runge_kutta_param4
	external adamsmuolton_param3,y_Heun_param3,y_Euler_param3
	double precision x0,y0,z0
	double precision y_hasil, z_hasil
	common /area5b/ x, metode, y_hasil, z_hasil

	h = 0.002
	x0 = 0
	y0 = 0
	z0 = 0
	select case (metode)
		case (1)
			call y_Euler_param3(x0,y0,z0,x,h,soal3Rdy,soal3Rdz,y_hasil,z_hasil)			
		case (2)
			call y_Heun_param3(x0,y0,z0,x,h,soal3Rdy,soal3Rdz,y_hasil,z_hasil)
		case (3)
			call runge_kutta_param3(x0,y0,z0,x,h,soal3Rdy,soal3Rdz,y_hasil,z_hasil)
		case (4)
			call runge_kutta_param4(x0,y0,z0,x,h,soal3Rdy,soal3Rdz,y_hasil,z_hasil)
		case (5)
			call adamsmuolton_param3(x0,y0,z0,x,h,soal3Rdy,soal3Rdz,y_hasil,z_hasil)
	end select
	
	hitungpsoal5b = 1
end
	
!-------------------------------------------------------------------------------
!-------------------------------------------------------------------------------

!Error message
subroutine error(errmsge)
	implicit none
	character*50 errmsge
	integer i
	i	= winio@('%ca[Error]%bg[grey]&')
	i	= winio@('%nl%cn%ws&', errmsge)
	i	= winio@('%2nl%cn%bt[BACK]')
end
